using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class mtn_ProceduresMap : EntityTypeConfiguration<mtn_Procedures>
    {
        public mtn_ProceduresMap()
        {
            // Primary Key
            this.HasKey(t => t.id);

            // Properties
            this.Property(t => t.Title)
                .HasMaxLength(50);

            this.Property(t => t.Description)
                .HasMaxLength(400);

            this.Property(t => t.category)
                .HasMaxLength(50);

            this.Property(t => t.Question)
                .HasMaxLength(100);

            this.Property(t => t.Answer)
                .HasMaxLength(100);

            this.Property(t => t.Procedure)
                .HasMaxLength(100);

            this.Property(t => t.PreProcedure)
                .HasMaxLength(50);

            this.Property(t => t.PostProcdure)
                .HasMaxLength(50);

            this.Property(t => t.Code)
                .HasMaxLength(50);

            this.Property(t => t.Password)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("mtn_Procedures");
            this.Property(t => t.id).HasColumnName("id");
            this.Property(t => t.Title).HasColumnName("Title");
            this.Property(t => t.Description).HasColumnName("Description");
            this.Property(t => t.category).HasColumnName("category");
            this.Property(t => t.Question).HasColumnName("Question");
            this.Property(t => t.Answer).HasColumnName("Answer");
            this.Property(t => t.Procedure).HasColumnName("Procedure");
            this.Property(t => t.PreProcedure).HasColumnName("PreProcedure");
            this.Property(t => t.PostProcdure).HasColumnName("PostProcdure");
            this.Property(t => t.Code).HasColumnName("Code");
            this.Property(t => t.order).HasColumnName("order");
            this.Property(t => t.Password).HasColumnName("Password");
        }
    }
}
